package demo4;

public class Main {
    public static void main(String[] args) throws InterruptedException {
        MyTimer myTimer=new MyTimer();
        myTimer.schedule(new MyTask() {
            @Override
            public void run() {
                System.out.println("任务3");
            }
        },3000);
        myTimer.schedule(new MyTask() {
            @Override
            public void run() {
                System.out.println("任务1");
            }
        },1000);
        myTimer.schedule(new MyTask() {
            @Override
            public void run() {
                System.out.println("任务2");
            }
        },2000);
        System.out.println(Runtime.getRuntime().availableProcessors());
    }
}
